package controllers;

import beans.dto.ResultBean;
import play.mvc.Controller;
/**
 * @author zhangzc
 * @since 2017/9/22
 */
public class BaseController extends Controller {

    protected static void wsOk(Object data){
        ResultBean result = new ResultBean();
        result.code = 0;
        result.data = data;
        renderJSON(result);
    }




    protected static void wsError(String msg){
        ResultBean result = new ResultBean();
        result.code = 1;
        result.data = msg;
        renderJSON(result);
    }

}
